package cn.chiship.bs.api.biz.pojo.dto;

import cn.chiship.sdk.core.base.constants.BaseTipConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author lj
 */
@ApiModel(description = "商品分类表单")
public class ProductCategoryDto {
    @ApiModelProperty(value = "分类名称", required = true)
    @NotNull(message = "分类名称" + BaseTipConstants.NOT_EMPTY)
    @Length(min = 1, max = 20, message = "分类名称" + BaseTipConstants.LENGTH_MIN_MAX)
    private String name;


    @ApiModelProperty(value = "分类排序", required = true)
    @NotNull(message = "分类排序" + BaseTipConstants.NOT_EMPTY)
    @Min(value = 1)
    private Long orders;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getOrders() {
        return orders;
    }

    public void setOrders(Long orders) {
        this.orders = orders;
    }
}
